<template>
  <el-button type="primary" icon="el-icon-arrow-left" v-on:click="goBack">
    返回
  </el-button>
</template>
<script>
export default {
  name: "goBack",
  methods: {
  //返回
    goBack() {
      window.history.length > 1 ? this.$router.go(-1) : this.$router.push("/");
    }
  }
};
</script>
